package com.aplink.generic.pojo.controlspec;

import com.aplink.generic.constant.type.ListViewSelection;
import com.aplink.generic.util.ResourcesHelper;
import com.aplink.generic.util.objectrule.TargetCollection;

public class ListviewSpec extends ControlSpec {
    /**
     * 
     */
    private static final long serialVersionUID = -280437468080723004L;
    private boolean isLoadAll;
    private String mContentData;
    private String mDisplayProperty;
    private String mFooter;
    private String mHeader;
    private String mLinkingValueProp;
    private ListViewSelection mListViewSelection;
    private String mRowItem;
    private String mRptrdesign;
    private TargetCollection mTargetCollection;

    public ListviewSpec() {

    }

    public ListviewSpec(final String mRowItem, final String mRptrdesign,
            final String mContentData, final TargetCollection targetCollection,
            final String mHeader, final String mFooter,
            final ListViewSelection listViewSelection) {
        this.mRowItem = mRowItem;
        this.mRptrdesign = mRptrdesign;
        this.mContentData = mContentData;
        setTargetCollection(targetCollection);
        this.mHeader = mHeader;
        this.mFooter = mFooter;
        if (listViewSelection == null) {
            this.mListViewSelection = ListViewSelection.NONE;
        } else {
            this.mListViewSelection = listViewSelection;
        }
    }

    public int getContentDataID() {
        return ResourcesHelper.getRawIdByName(this.mContentData);
    }

    public String getDisplayProperty() {
        return this.mDisplayProperty;
    }

    public String getFooter() {
        return this.mFooter;
    }

    public String getHeader() {
        return this.mHeader;
    }

    public String getLinkingValueProp() {
        return this.mLinkingValueProp;
    }

    public ListViewSelection getListViewSelection() {
        return this.mListViewSelection;
    }

    public String getRowItem() {
        return this.mRowItem;
    }

    public String getRptrdesign() {
        return this.mRptrdesign;
    }

    public int getRptrdesignID() {
        return ResourcesHelper.getRawIdByName(this.mRptrdesign);
    }

    public TargetCollection getTargetCollection() {
        return this.mTargetCollection;
    }

    public String initContentData() {
        return this.mContentData;
    }

    public boolean isLoadAll() {
        return this.isLoadAll;
    }

    public void setContentDatal(final String contentData) {
        this.mContentData = contentData;
    }

    public void setDisplayProperty(final String displayProperty) {
        this.mDisplayProperty = displayProperty;
    }

    public void setFooter(final String footer) {
        this.mFooter = footer;
    }

    public void setHeader(final String header) {
        this.mHeader = header;
    }

    public void setLinkingValueProp(final String linkingValueProp) {
        this.mLinkingValueProp = linkingValueProp;
    }

    public void setListViewSelection(final ListViewSelection listViewSelection) {
        this.mListViewSelection = listViewSelection;
    }

    public void setLoadAll(final boolean isLoadAll) {
        this.isLoadAll = isLoadAll;
    }

    public void setRowItem(final String rowItem) {
        this.mRowItem = rowItem;
    }

    public void setRptrdesign(final String rptrdesign) {
        this.mRptrdesign = rptrdesign;
    }

    public void setTargetCollection(final TargetCollection targetCollection) {
        this.mTargetCollection = targetCollection;
    }
}
